package com.hzw.saas.api.rbac.query;

import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 添加权限参数
 *
 * @author zzl
 * @since 08/30/2021
 */
@Data
@ApiModel("新增权限参数")
public class PermissionAddQuery implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 上级权限ID, 无上级权限时为0
     */
    @ApiModelProperty(value = "上级权限ID, 无上级权限时为0")
    private String supId;

    /**
     * 所属系统, 1-后台管理用户, 2-云平台用户
     */
    @ApiModelProperty(value = "所属系统, 1-后台管理用户, 2-云平台用户", required = true)
    @NotNull(message = "所属系统不可为空")
    private Integer sys;

    /**
     * 权限名称
     */
    @ApiModelProperty(value = "权限名称", required = true)
    @NotBlank(message = "权限名称不可为空")
    private String name;

    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    @ApiModelProperty(value = "授权(多个用逗号分隔，如：user:list,user:create)")
    private String auth;

    /**
     * 权限类型, 1:菜单, 2:按钮, 3:数据
     */
    @ApiModelProperty(value = "权限类型, 1:菜单, 2:按钮, 3:数据", required = true)
    @NotNull(message = "权限类型不可为空")
    private Integer type;

    /**
     * URL
     */
    @ApiModelProperty(value = "URL")
    private String url;

    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    private String icon;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer seq;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
}
